<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      //链式操作: map().filter().filter().map().reduce().forEach();
      //任何一个promise对象都有then方法,then的返还值无论如何都是一个promise对象
      let p = new Promise((resolve) => {
        resolve(111);
      });
      let p2 = p.then((res) => {
        console.log(res);
        return 222;
      });
    </script>
  </body>
</html>
